<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>购物车</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            background-color: #FFEEF7;
            margin: 0;
            padding: 20px;
            color: #333;
        }
        .cart-container {
            max-width: 600px;
            margin: 0 auto;
            background: #fff;
            padding: 20px;
            border-radius: 8px;
            box-shadow: 0 2px 5px rgba(0,0,0,0.2);
        }
        .cart-item {
            display: flex;
            align-items: center;
            justify-content: space-between;
            border-bottom: 1px solid #eee;
            padding: 10px 0;
        }
        .cart-item:last-child {
            border-bottom: none;
        }
        .item-image {
            width: 60px;
            height: 60px;
            object-fit: cover;
            border-radius: 4px;
            margin-right: 10px;
        }
        .item-details {
            flex-grow: 1;
        }
        .item-name, .item-price, .item-quantity {
            margin: 2px 0;
            font-size: 16px;
        }
        .item-quantity-container {
            display: flex;
            text-align: center; /* 使文本居中 */
            align-items: center;
        }
        .item-quantity-container button {
            padding: 5px;
            text-align: center;
            margin: 0 5px;
        }
        button {
            padding: 10px;
            background-color: #FF69B4;
            color: white;
            border: none;
            border-radius: 4px;
            cursor: pointer;
            font-size: 16px;
            transition: background-color 0.3s ease;
        }
        button:hover {
            background-color: #FF1493;
        }
        .total {
            text-align: right;
            margin-top: 20px;
        }
        .checkout-button {
            padding: 10px;
            background-color: #FF69B4;
            color: white;
            border: none;
            border-radius: 4px;
            cursor: pointer;
            font-size: 16px;
            transition: background-color 0.3s ease;
        }
    </style>
</head>
<body>
<div class="cart-container">
    <h2>购物车</h2>
    <div id="cartItems"></div>
    <div class="total">
        <span>总计：</span><span id="totalPrice">0</span>
    </div>
    <button class="checkout-button" onclick="checkout()">结账</button>
    <button id="manageButton">管理</button>
    <button id="confirmDeleteButton" style="display:none;">确定</button>
    <button id="cancelDeleteButton" style="display:none;">取消</button>
</div>

<script src="shopping-cart.js"></script>

 </body> </html>